******SET YOUR DIRECTORY to ...\replication



clear all


///Convert  shapefile  to  Stata  attribute  and  coordinate  datasets
shp2dta using intermediatedata\statsgo_place00_naec, data("map-­-attr.dta") coord("map-­-coord.dta") ///
 genid(stid)  gencentroids(cc) replace

use intermediatedata\map-­-attr.dta, clear

destring MUKEY, gen(mukey) force
drop MUKEY
rename PLCIDFP00 fipsplace_00
destring fipsplace_00, replace force
destring STATEFP00, replace force
destring PLACEFP00, replace force

save intermediatedata\map-­-attr_m.dta, replace

///Merge with mapunit.txt
insheet using "rawdata\wss_gsmsoil_US_[2006-07-06]\tabular\mapunit.txt", clear delimiter("|")
rename v1 musym
rename v2 muname
rename v3 nukind
rename v4 mustatus
rename v5 muacres
rename v6 mapunitflfw_l
rename v7 mapunitflfw_r
rename v8 mapunitflfw_h
rename v9 mapunitpfa_l
rename v10 mapunitpfa_r
rename v11 mapunitpfa_h
rename v12 farmlndcl
rename v13 muhelcl
rename v14 muwathelcl
rename v15 muwndhelcl
rename v16 interpfocus
rename v17 invesintens
rename v18 iacornsr
rename v19 nhiforsoigrp
rename v20 nhspiagr
rename v21 vtsepticsyscl
rename v22 mucertstat
rename v23 lkey
rename v24 mukey
label var mukey "Map unit ID"
label var muname "Map unit name"

keep mukey muname

merge 1:m mukey using intermediatedata\map-­-attr_m.dta
drop if _merge==1
drop _merge

save intermediatedata\map-­-attr_m.dta, replace

///Merge comp.txt with chorizon.txt
insheet using "rawdata\wss_gsmsoil_US_[2006-07-06]\tabular\comp.txt", clear delimiter("|")
rename v2 comppct_r
rename v4 compname
rename v10 slope_r
rename v26 elev_r
rename v39 map_r
rename v108 mukey
rename v109 cokey
label var comppct_r "Percentage of the component of the mapunit"
label var compname "Component name"
label var slope_r "Slope RV"
label var elev_r "Elevation RV"
label var map_r "Arithmetic average of the total annual (liquid) precipitation taken over 1961-1990"
label var mukey "Map unit ID"
label var cokey "Component ID"

drop v*

save rawdata\wss_gsmsoil_US_[2006-07-06]\comp_m.dta, replace

insheet using "rawdata\wss_gsmsoil_US_[2006-07-06]\tabular\chorizon.txt", clear delimiter("|")
rename v1 hzname
rename v7 hzdept_r
rename v10 hzdepb_r
rename v135 ph1to1h20_l
rename v136 ph1to1h20_r
rename v137 ph1to1h20_h
rename v138 ph01mcacl2_l
rename v139 ph01mcacl2_r
rename v140 ph01mcacl2_h
rename v170 cokey
rename v171 chkey
label var hzname "Symbol of kind of layers in soil"
label var hzdept_r "Distance from the top of the soil to the upper boundary of the soil horizon"
label var hzdepb_r "Distance from the top of the soil to the base of the soil horizon"
label var ph1to1h20_l "Negative logarithm to the base 10 of the hydrogen ion activity in the soil using the 1:1 soil-water ratio method LOW"
label var ph1to1h20_r "Negative logarithm to the base 10 of the hydrogen ion activity in the soil using the 1:1 soil-water ratio method RV"
label var ph1to1h20_h "Negative logarithm to the base 10 of the hydrogen ion activity in the soil using the 1:1 soil-water ratio method HIGH"
label var ph01mcacl2_l "Negative logarithm to base of 10 or the hydrogen ion activity in the soil using the 0.01M CaCl2 method in a 1:2 soil:solution ratio LOW"
label var ph01mcacl2_r "Negative logarithm to base of 10 or the hydrogen ion activity in the soil using the 0.01M CaCl2 method in a 1:2 soil:solution ratio RV"
label var ph01mcacl2_h "Negative logarithm to base of 10 or the hydrogen ion activity in the soil using the 0.01M CaCl2 method in a 1:2 soil:solution ratio HIGH"
label var cokey "Component ID"
label var chkey "Horizon ID"

drop v*

***Number observations
*Number horizons
egen group_hor=group(hzdept_r hzdepb_r)
sum group_hor
drop group_hor
*Percentage horizons at the top of the soil
tab hzdept_r
*Number of different horizons at the top of the soil (according to height horizon)
codebook hzdepb_r if hzdept_r==0

merge m:1 cokey using rawdata\wss_gsmsoil_US_[2006-07-06]\comp_m.dta
drop if _merge==2
drop _merge

***Number observations
*Number components
codebook compname
*Number map units
codebook mukey
*Average number components in one map unit at top of the soil
egen seq_compmu=seq() if hzdept_r==0, by(mukey)
sum seq_compmu
drop seq_compmu

///Aggregate ph variables at component level
egen ph1_comp_m_l=mean(ph1to1h20_l), by(cokey)
egen ph1_comp_m_r=mean(ph1to1h20_r), by(cokey)
egen ph1_comp_m_h=mean(ph1to1h20_h), by(cokey)
label var ph1_comp_m_l "Mean ph1 by component LOW"
label var ph1_comp_m_r "Mean ph1 by component RV"
label var ph1_comp_m_h "Mean ph1 by component HIGH"

egen ph01_comp_m_l=mean(ph01mcacl2_l), by(cokey)
egen ph01_comp_m_r=mean(ph01mcacl2_r), by(cokey)
egen ph01_comp_m_h=mean(ph01mcacl2_h), by(cokey)
label var ph01_comp_m_l "Mean ph01 by component LOW"
label var ph01_comp_m_r "Mean ph01 by component RV"
label var ph01_comp_m_h "Mean ph01 by component HIGH"

gen wt=1/(hzdept_r+1)
egen ph1_comp_wtm_l=wtmean(ph1to1h20_l), weight(wt) by(cokey)
egen ph1_comp_wtm_r=wtmean(ph1to1h20_r), weight(wt) by(cokey)
egen ph1_comp_wtm_h=wtmean(ph1to1h20_h), weight(wt) by(cokey)
label var ph1_comp_wtm_l "Weighted mean (inverse distance layer+1) ph1 by component LOW"
label var ph1_comp_wtm_r "Weighted mean (inverse distance layer+1)  ph1 by component RV"
label var ph1_comp_wtm_h "Weighted mean (inverse distance layer+1)  ph1 by component HIGH"

egen ph01_comp_wtm_l=wtmean(ph01mcacl2_l), weight(wt) by(cokey)
egen ph01_comp_wtm_r=wtmean(ph01mcacl2_r), weight(wt) by(cokey)
egen ph01_comp_wtm_h=wtmean(ph01mcacl2_h), weight(wt) by(cokey)
label var ph01_comp_wtm_l "Weighted mean (inverse distance layer+1)  ph01 by component LOW"
label var ph01_comp_wtm_r "Weighted mean (inverse distance layer+1)  ph01 by component RV"
label var ph01_comp_wtm_h "Weighted mean (inverse distance layer+1)  ph01 by component HIGH"
drop wt

egen ph1_comp_0_l2=mean(ph1to1h20_l) if hzdept_r==0, by(cokey)
egen ph1_comp_0_l=mean(ph1_comp_0_l2), by(cokey)
egen ph1_comp_0_r2=mean(ph1to1h20_r) if hzdept_r==0, by(cokey)
egen ph1_comp_0_r=mean(ph1_comp_0_r2), by(cokey)
egen ph1_comp_0_h2=mean(ph1to1h20_h) if hzdept_r==0, by(cokey)
egen ph1_comp_0_h=mean(ph1_comp_0_h2), by(cokey)
drop ph1_comp_0_l2 ph1_comp_0_r2 ph1_comp_0_h2
label var ph1_comp_0_l "Top of soil level mean ph1 by component LOW"
label var ph1_comp_0_r "Top of soil level mean ph1 by component RV"
label var ph1_comp_0_h "Top of soil level mean ph1 by component HIGH"

egen ph01_comp_0_l2=mean(ph01mcacl2_l) if hzdept_r==0, by(cokey)
egen ph01_comp_0_l=mean(ph01_comp_0_l2), by(cokey)
egen ph01_comp_0_r2=mean(ph01mcacl2_r) if hzdept_r==0, by(cokey)
egen ph01_comp_0_r=mean(ph01_comp_0_r2), by(cokey)
egen ph01_comp_0_h2=mean(ph01mcacl2_h) if hzdept_r==0, by(cokey)
egen ph01_comp_0_h=mean(ph01_comp_0_h2), by(cokey)
drop ph01_comp_0_l2 ph01_comp_0_r2 ph01_comp_0_h2
label var ph01_comp_0_l "Top of soil level mean ph01 by component LOW"
label var ph01_comp_0_r "Top of soil level mean ph01 by component RV"
label var ph01_comp_0_h "Top of soil level mean ph01 by component HIGH"

egen lowhzdept_comp_r2=min(hzdept_r) if hzdept_r!=0 & hzdept_r!=., by(cokey)
egen ph1_comp_low_l2=mean(ph1to1h20_l) if hzdept_r==lowhzdept_comp_r2, by(cokey)
egen ph1_comp_low_l=mean(ph1_comp_low_l2), by(cokey)
egen ph1_comp_low_r2=mean(ph1to1h20_r) if hzdept_r==lowhzdept_comp_r2, by(cokey)
egen ph1_comp_low_r=mean(ph1_comp_low_r2), by(cokey)
egen ph1_comp_low_h2=mean(ph1to1h20_h) if hzdept_r==lowhzdept_comp_r2, by(cokey)
egen ph1_comp_low_h=mean(ph1_comp_low_h2), by(cokey)
drop ph1_comp_low_l2 ph1_comp_low_r2 ph1_comp_low_h2
label var ph1_comp_low_l "Highest level of soil mean ph1 by component LOW"
label var ph1_comp_low_r "Highest level of soil mean ph1 by component RV"
label var ph1_comp_low_h "Highest level of soil mean ph1 by component HIGH"

egen ph01_comp_low_l2=mean(ph01mcacl2_l) if hzdept_r==lowhzdept_comp_r2, by(cokey)
egen ph01_comp_low_l=mean(ph01_comp_low_l2), by(cokey)
egen ph01_comp_low_r2=mean(ph01mcacl2_r) if hzdept_r==lowhzdept_comp_r2, by(cokey)
egen ph01_comp_low_r=mean(ph01_comp_low_r2), by(cokey)
egen ph01_comp_low_h2=mean(ph01mcacl2_h) if hzdept_r==lowhzdept_comp_r2, by(cokey)
egen ph01_comp_low_h=mean(ph01_comp_low_h2), by(cokey)
drop ph01_comp_low_l2 ph01_comp_low_r2 ph01_comp_low_h2
label var ph01_comp_low_l "Highest level of soil mean ph01 by component LOW"
label var ph01_comp_low_r "Highest level of soil mean ph01 by component RV"
label var ph01_comp_low_h "Highest level of soil mean ph01 by component HIGH"

egen lowhzdept_comp_r=mean(lowhzdept_comp_r2), by(cokey)
egen lowhzdepb_comp_r2=min(hzdepb_r) if hzdepb_r!=0 & hzdepb_r!=., by(cokey)
egen lowhzdepb_comp_r=mean(lowhzdepb_comp_r2), by(cokey)
drop lowhzdept_comp_r2 lowhzdepb_comp_r2
label var lowhzdept_comp_r "Lowest component distance from the top of the soil to the upper boundary of the soil horizon"
label var lowhzdepb_comp_r "Lowest component distance from the top of the soil to the base of the soil horizon"

collapse (firstnm) compname (mean) comppct_r slope_r-lowhzdepb_comp_r, by(cokey)
label var ph1_comp_m_l "Mean ph1 by component LOW"
label var ph1_comp_m_r "Mean ph1 by component RV"
label var ph1_comp_m_h "Mean ph1 by component HIGH"
label var ph01_comp_m_l "Mean ph01 by component LOW"
label var ph01_comp_m_r "Mean ph01 by component RV"
label var ph01_comp_m_h "Mean ph01 by component HIGH"
label var ph1_comp_wtm_l "Weighted mean (inverse distance layer+1) ph1 by component LOW"
label var ph1_comp_wtm_r "Weighted mean (inverse distance layer+1)  ph1 by component RV"
label var ph1_comp_wtm_h "Weighted mean (inverse distance layer+1)  ph1 by component HIGH"
label var ph01_comp_wtm_l "Weighted mean (inverse distance layer+1)  ph01 by component LOW"
label var ph01_comp_wtm_r "Weighted mean (inverse distance layer+1)  ph01 by component RV"
label var ph01_comp_wtm_h "Weighted mean (inverse distance layer+1)  ph01 by component HIGH"
label var ph1_comp_0_l "Top of soil level mean ph1 by component LOW"
label var ph1_comp_0_r "Top of soil level mean ph1 by component RV"
label var ph1_comp_0_h "Top of soil level mean ph1 by component HIGH"
label var ph01_comp_0_l "Top of soil level mean ph01 by component LOW"
label var ph01_comp_0_r "Top of soil level mean ph01 by component RV"
label var ph01_comp_0_h "Top of soil level mean ph01 by component HIGH"
label var ph1_comp_low_l "Highest level of soil mean ph1 by component LOW"
label var ph1_comp_low_r "Highest level of soil mean ph1 by component RV"
label var ph1_comp_low_h "Highest level of soil mean ph1 by component HIGH"
label var ph01_comp_low_l "Highest level of soil mean ph01 by component LOW"
label var ph01_comp_low_r "Highest level of soil mean ph01 by component RV"
label var ph01_comp_low_h "Highest level of soil mean ph01 by component HIGH"
label var lowhzdept_comp_r "Lowest component distance from the top of the soil to the upper boundary of the soil horizon"
label var lowhzdepb_comp_r "Lowest component distance from the top of the soil to the base of the soil horizon"
label var comppct_r "Percentage of the component of the mapunit"
label var compname "Component name"
label var slope_r "Slope RV"
label var elev_r "Elevation RV"
label var map_r "Arithmetic average of the total annual (liquid) precipitation taken over 1961-1990"
label var mukey "Map unit ID"
label var cokey "Component ID"

///Merge comp+chorizon with map

joinby mukey using intermediatedata\map-­-attr_m.dta

save intermediatedata\map-­-attr_m.dta, replace


///Aggregate ph variables at map unit level

egen ph1_munit_wtm_m_l=wtmean(ph1_comp_m_l),by(stid) weight(comppct_r)
egen ph1_munit_wtm_m_r=wtmean(ph1_comp_m_r),by(stid) weight(comppct_r)
egen ph1_munit_wtm_m_h=wtmean(ph1_comp_m_h),by(stid) weight(comppct_r)

egen ph1_munit_wtm_wtm_l=wtmean(ph1_comp_wtm_l),by(stid) weight(comppct_r)
egen ph1_munit_wtm_wtm_r=wtmean(ph1_comp_wtm_r),by(stid) weight(comppct_r)
egen ph1_munit_wtm_wtm_h=wtmean(ph1_comp_wtm_h),by(stid) weight(comppct_r)

egen ph1_munit_wtm_0_l=wtmean(ph1_comp_0_l),by(stid) weight(comppct_r)
egen ph1_munit_wtm_0_r=wtmean(ph1_comp_0_r),by(stid) weight(comppct_r)
egen ph1_munit_wtm_0_h=wtmean(ph1_comp_0_h),by(stid) weight(comppct_r)

egen ph1_munit_wtm_low_l=wtmean(ph1_comp_low_l),by(stid) weight(comppct_r)
egen ph1_munit_wtm_low_r=wtmean(ph1_comp_low_r),by(stid) weight(comppct_r)
egen ph1_munit_wtm_low_h=wtmean(ph1_comp_low_h),by(stid) weight(comppct_r)

egen slope_munit_wtm_r=wtmean(slope_r), by(stid) weight(comppct_r)
egen elev_munit_wtm_r=wtmean(elev_r), by(stid) weight(comppct_r)
egen precip_munit_wtm_r=wtmean(map_r), by(stid) weight(comppct_r)

collapse (firstnm) muname AREASYMBOL MUSYM NAME00-FUNCSTAT00 INTPTLAT00 INTPTLON00 (mean) mukey fipsplace_00 x_cc y_cc SPATIALVER STATEFP00 PLACEFP00 ALAND00 AWATER00 AREA PERIMETER *_munit_*, by(stid)
label var mukey "Map unit ID"
label var muname "Map unit name"
label var ph1_munit_wtm_m_l "Weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component LOW LOW"
label var ph1_munit_wtm_m_r "Weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component RV"
label var ph1_munit_wtm_m_h "Weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component HIGH"
label var ph1_munit_wtm_wtm_l "Weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1) ph1 by component LOW"
label var ph1_munit_wtm_wtm_r "Weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component RV"
label var ph1_munit_wtm_wtm_h "Weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component HIGH"
label var ph1_munit_wtm_0_l "Weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component LOW"
label var ph1_munit_wtm_0_r "Weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component RV"
label var ph1_munit_wtm_0_h "Weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component HIGH"
label var ph1_munit_wtm_low_l "Weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component LOW"
label var ph1_munit_wtm_low_r "Weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component RV"
label var ph1_munit_wtm_low_h "Weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component HIGH"
label var slope_munit_wtm_r "Weighted mean slope by map unit (wt by component pct)"
label var elev_munit_wtm_r "Weighted mean elevation by map unit (wt by component pct)"
label var precip_munit_wtm_r "Weighted mean precipitation by map unit (wt by component pct)"

***Average number map units per place
egen seq_muplace=seq(), by(fipsplace_00)
sum seq_muplace
drop seq_muplace

///Aggregate ph variables at place level

egen ph1_plc_wtm_wtm_m_l=wtmean(ph1_munit_wtm_m_l), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_m_r=wtmean(ph1_munit_wtm_m_r), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_m_h=wtmean(ph1_munit_wtm_m_h), by(fipsplace_00) weight(AREA)

egen ph1_plc_wtm_wtm_wtm_l=wtmean(ph1_munit_wtm_wtm_l), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_wtm_r=wtmean(ph1_munit_wtm_wtm_r), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_wtm_h=wtmean(ph1_munit_wtm_wtm_h), by(fipsplace_00) weight(AREA)

egen ph1_plc_wtm_wtm_0_l=wtmean(ph1_munit_wtm_0_l), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_0_r=wtmean(ph1_munit_wtm_0_r), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_0_h=wtmean(ph1_munit_wtm_0_h), by(fipsplace_00) weight(AREA)

egen ph1_plc_wtm_wtm_low_l=wtmean(ph1_munit_wtm_low_l), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_low_r=wtmean(ph1_munit_wtm_low_r), by(fipsplace_00) weight(AREA)
egen ph1_plc_wtm_wtm_low_h=wtmean(ph1_munit_wtm_low_h), by(fipsplace_00) weight(AREA)

egen ph1_plc_max_wtm_m_l=max(ph1_munit_wtm_m_l), by(fipsplace_00)
egen ph1_plc_max_wtm_m_r=max(ph1_munit_wtm_m_r), by(fipsplace_00)
egen ph1_plc_max_wtm_m_h=max(ph1_munit_wtm_m_h), by(fipsplace_00)

egen ph1_plc_max_wtm_wtm_l=max(ph1_munit_wtm_wtm_l), by(fipsplace_00)
egen ph1_plc_max_wtm_wtm_r=max(ph1_munit_wtm_wtm_r), by(fipsplace_00)
egen ph1_plc_max_wtm_wtm_h=max(ph1_munit_wtm_wtm_h), by(fipsplace_00)

egen ph1_plc_max_wtm_0_l=max(ph1_munit_wtm_0_l), by(fipsplace_00)
egen ph1_plc_max_wtm_0_r=max(ph1_munit_wtm_0_r), by(fipsplace_00)
egen ph1_plc_max_wtm_0_h=max(ph1_munit_wtm_0_h), by(fipsplace_00)

egen ph1_plc_max_wtm_low_l=max(ph1_munit_wtm_low_l), by(fipsplace_00)
egen ph1_plc_max_wtm_low_r=max(ph1_munit_wtm_low_r), by(fipsplace_00)
egen ph1_plc_max_wtm_low_h=max(ph1_munit_wtm_low_h), by(fipsplace_00)

egen ph1_plc_min_wtm_m_l=min(ph1_munit_wtm_m_l), by(fipsplace_00)
egen ph1_plc_min_wtm_m_r=min(ph1_munit_wtm_m_r), by(fipsplace_00)
egen ph1_plc_min_wtm_m_h=min(ph1_munit_wtm_m_h), by(fipsplace_00)

egen ph1_plc_min_wtm_wtm_l=min(ph1_munit_wtm_wtm_l), by(fipsplace_00)
egen ph1_plc_min_wtm_wtm_r=min(ph1_munit_wtm_wtm_r), by(fipsplace_00)
egen ph1_plc_min_wtm_wtm_h=min(ph1_munit_wtm_wtm_h), by(fipsplace_00)

egen ph1_plc_min_wtm_0_l=min(ph1_munit_wtm_0_l), by(fipsplace_00)
egen ph1_plc_min_wtm_0_r=min(ph1_munit_wtm_0_r), by(fipsplace_00)
egen ph1_plc_min_wtm_0_h=min(ph1_munit_wtm_0_h), by(fipsplace_00)

egen ph1_plc_min_wtm_low_l=min(ph1_munit_wtm_low_l), by(fipsplace_00)
egen ph1_plc_min_wtm_low_r=min(ph1_munit_wtm_low_r), by(fipsplace_00)
egen ph1_plc_min_wtm_low_h=min(ph1_munit_wtm_low_h), by(fipsplace_00)

egen area_plc=total(AREA), by(fipsplace_00)
egen slope_plc_wtm_wtm_r=wtmean(slope_munit_wtm_r), by(fipsplace_00) weight(AREA)
egen elev_plc_wtm_wtm_r=wtmean(elev_munit_wtm_r), by(fipsplace_00) weight(AREA)
egen precip_plc_wtm_wtm_r=wtmean(precip_munit_wtm_r), by(fipsplace_00) weight(AREA)
egen slope_plc_max_wtm_r=max(slope_munit_wtm_r), by(fipsplace_00)
egen elev_plc_max_wtm_r=max(elev_munit_wtm_r), by(fipsplace_00)
egen precip_plc_max_wtm_r=max(precip_munit_wtm_r), by(fipsplace_00)
egen slope_plc_min_wtm_r=min(slope_munit_wtm_r), by(fipsplace_00)
egen elev_plc_min_wtm_r=min(elev_munit_wtm_r), by(fipsplace_00)
egen precip_plc_min_wtm_r=min(precip_munit_wtm_r), by(fipsplace_00)

collapse (firstnm) AREASYMBOL-INTPTLON00 (mean) SPATIALVER-AWATER00 *_plc_* area_plc, by(fipsplace_00)
label var fipsplace_00 "FIPS place code 2000"
label var NAMELSAD00 "FIPS place name 2000"
label var INTPTLAT00 "Latitude"
label var INTPTLON00 "Longitude"
label var STATEFP00 "FIPS state code 2000"
label var ph1_plc_wtm_wtm_m_l "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component LOW LOW"
label var ph1_plc_wtm_wtm_m_r "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component RV"
label var ph1_plc_wtm_wtm_m_h "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component HIGH"
label var ph1_plc_wtm_wtm_wtm_l "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1) ph1 by component LOW"
label var ph1_plc_wtm_wtm_wtm_r "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component RV"
label var ph1_plc_wtm_wtm_wtm_h "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component HIGH"
label var ph1_plc_wtm_wtm_0_l "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component LOW"
label var ph1_plc_wtm_wtm_0_r "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component RV"
label var ph1_plc_wtm_wtm_0_h "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component HIGH"
label var ph1_plc_wtm_wtm_low_l "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component LOW"
label var ph1_plc_wtm_wtm_low_r "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component RV"
label var ph1_plc_wtm_wtm_low_h "Weighted mean ph1 by place (wt by area) of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component HIGH"
label var ph1_plc_max_wtm_m_l "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component LOW LOW"
label var ph1_plc_max_wtm_m_r "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component RV"
label var ph1_plc_max_wtm_m_h "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component HIGH"
label var ph1_plc_max_wtm_wtm_l "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1) ph1 by component LOW"
label var ph1_plc_max_wtm_wtm_r "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component RV"
label var ph1_plc_max_wtm_wtm_h "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component HIGH"
label var ph1_plc_max_wtm_0_l "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component LOW"
label var ph1_plc_max_wtm_0_r "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component RV"
label var ph1_plc_max_wtm_0_h "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component HIGH"
label var ph1_plc_max_wtm_low_l "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component LOW"
label var ph1_plc_max_wtm_low_r "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component RV"
label var ph1_plc_max_wtm_low_h "Max ph1 by place of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component HIGH"
label var ph1_plc_min_wtm_m_l "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component LOW LOW"
label var ph1_plc_min_wtm_m_r "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component RV"
label var ph1_plc_min_wtm_m_h "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of mean ph1 by component HIGH"
label var ph1_plc_min_wtm_wtm_l "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1) ph1 by component LOW"
label var ph1_plc_min_wtm_wtm_r "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component RV"
label var ph1_plc_min_wtm_wtm_h "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of weighted mean (inverse distance layer+1)  ph1 by component HIGH"
label var ph1_plc_min_wtm_0_l "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component LOW"
label var ph1_plc_min_wtm_0_r "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component RV"
label var ph1_plc_min_wtm_0_h "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of top of soil level mean ph1 by component HIGH"
label var ph1_plc_min_wtm_low_l "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component LOW"
label var ph1_plc_min_wtm_low_r "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component RV"
label var ph1_plc_min_wtm_low_h "Min ph1 by place of weighted mean ph1 by map unit (wt by component pct) of highest level of soil mean ph1 by component HIGH"
labe var area_plc "Area place"
label var slope_plc_wtm_wtm_r "Weighted mean slope by place (wt by area) of weighted mean slope by map unit (wt by component pct)"
label var elev_plc_wtm_wtm_r "Weighted mean elevation by place (wt by area) of weighted mean elevation by map unit (wt by component pct)"
label var precip_plc_wtm_wtm_r "Weighted mean precipitation by place (wt by area) of weighted mean precipitation by map unit (wt by component pct)"
label var slope_plc_max_wtm_r "Max slope by place of weighted mean slope by map unit (wt by component pct)"
label var elev_plc_max_wtm_r "Max elevation by place of weighted mean elevation by map unit (wt by component pct)"
label var precip_plc_max_wtm_r "Max precipitation by place of weighted mean precipitation by map unit (wt by component pct)"
label var slope_plc_min_wtm_r "Min slope by place of weighted mean slope by map unit (wt by component pct)"
label var elev_plc_min_wtm_r "Min elevation by place of weighted mean elevation by map unit (wt by component pct)"
label var precip_plc_min_wtm_r "Min precipitation by place of weighted mean precipitation by map unit (wt by component pct)"

save rawdata\wss_gsmsoil_US_[2006-07-06]\data_geology_plc.dta, replace

